package com.lqwu.mallchatserver.websocket.service.adapter;

import com.lqwu.mallchatserver.websocket.model.enums.WSRespTypeEnum;
import com.lqwu.mallchatserver.websocket.model.vo.response.WSBaseResp;
import com.lqwu.mallchatserver.websocket.model.vo.response.WsBaseResponse;
import com.lqwu.mallchatserver.websocket.model.vo.response.data.WSFriendApply;
import org.springframework.stereotype.Component;

/**
 * websocket消息服务适配器
 */
@Component
public class WSAdapter {

    public static WsBaseResponse<WSFriendApply> buildApplySend(WSFriendApply resp) {
        WsBaseResponse<WSFriendApply> wsBaseResp = new WsBaseResponse<>();
        wsBaseResp.setType(WSRespTypeEnum.APPLY.getType());
        wsBaseResp.setData(resp);
        return wsBaseResp;
    }
}
